A rate control methodology and architecture for implementation of that methodology are essential components of any video encoding scheme to ensure that a coding process meets bit rate and quality constraints placed upon the encoding scheme by an application. In particular, the methodology seeks to match an output bit rate by adapting coding parameters such that an appropriate number of bits are placed in a buffer memory used to assist in smoothing a variable demand of image statistics to match what is usually a required fixed output bit rate.
A compromise is usually required between image quality resulting from the coding process and the bit rate; an excessively low bit rate resulting in an undesirable reduction of image quality. The rate control methodology may achieve such a compromise by targeting optimal combinations of the coding parameters for a given application, where some parameters are appropriately defined by the operator of the equipment, whilst minimising the load on the hardware and software computing resources used to realise the process as a whole but more specifically the rate control mechanism. Furthermore, it is usual for an operator to set a required output bit rate and the operator may also condition the input video signal by, for example, filtering or down-sampling the signal to a lower resolution. It is also possible for a pre-processing stage to perform this filtering automatically, depending on some measure of how difficult the coding is, given the operator's choice of parameters such as bit rate. Once these parameters are set externally by the operator, the coding algorithm attempts to adjust other primary parameters to meet the set constraints and the coding algorithm matches the number of coded bits generated with the required output bit rate primarily by periodic monitoring of a state of fill of the smoothing buffer memory, the size of which is defined by the algorithm itself. If the fill state increases, the algorithm reduces the number of bits entered by increasing the degree of quantisation; conversely, if the state of fill reduces the degree of quantisation is reduced. This variation in the degree of quantisation is effected by means of a Quantisation Parameter Qp defined by the algorithm.
The realisation of the algorithm in practice may be achieved with optimum system efficiency, that is, minimal hardware and software resources consistent with achievement of the required performance standards. Management of the means whereby the value of Qp is determined, taking account of image behaviour over long or short periods of time, that is, the Rate Control, is not defined by the algorithm specification and, whereas means are provided to send a value of Qp frequently, its value should take account of the behaviour of the input image statistics over several time scales and should thereby avoid anomalies resulting from injudiciously simple rate control. One such anomaly for an over-simple rate control occurs where the value of Qp is determined over too short a period of time such that a top part of an active image is coded at a radically different Qp from a bottom part, with a result that undesirable differences in image quality of the top and bottom halves of the image are visible after decoding. To avoid this kind of difficulty some measure of longer term averaging for Qp is also necessary. There is therefore a requirement to provide an efficient and effective rate control that is also stable in operation and does not contravene the rules of a particular algorithm in use.
As a result of the need to have such an effective rate control methodology, several control levels operating over several periodicities such as macroblock, slice and picture are adopted which correspond directly to a detailed structural design of the chosen coding algorithm and which have direct relationships with an image structure. For example, the structure of an image is usually organised hierarchically according to a natural order of a sequence of moving images and individual picture elements or pixels that make up each separate picture of a video signal. Typically the most significant of these structural elements of the image are: picture, slice and macroblock each of which is also a defined element of H264 and other video coding schemes. A “picture” is one complete image from the television sequence; a picture is also known as a “frame”. According to industry practice, each picture or frame may also be divided into two fields where the image is scanned using interlace.